3.2458 \(\int x^3 (a+b x^n)^2 \, dx\)

Optimal. Leaf size=44 \[ \frac {a^2 x^4}{4}+\frac {2 a b x^{n+4}}{n+4}+\frac {b^2 x^{2 (n+2)}}{2 (n+2)} \]

[Out]

1/4*a^2*x^4+1/2*b^2*x^(4+2*n)/(2+n)+2*a*b*x^(4+n)/(4+n)

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {270} \[ \frac {a^2 x^4}{4}+\frac {2 a b x^{n+4}}{n+4}+\frac {b^2 x^{2 (n+2)}}{2 (n+2)} \]

Antiderivative was successfully verified.

[In]

Int[x^3*(a + b*x^n)^2,x]

[Out]

(a^2*x^4)/4 + (b^2*x^(2*(2 + n)))/(2*(2 + n)) + (2*a*b*x^(4 + n))/(4 + n)

Rule 270

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rubi steps

\begin {align*} \int x^3 \left (a+b x^n\right )^2 \, dx &=\int \left (a^2 x^3+2 a b x^{3+n}+b^2 x^{3+2 n}\right ) \, dx\\ &=\frac {a^2 x^4}{4}+\frac {b^2 x^{2 (2+n)}}{2 (2+n)}+\frac {2 a b x^{4+n}}{4+n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 38, normalized size = 0.86 \[ \frac {1}{4} x^4 \left (a^2+\frac {8 a b x^n}{n+4}+\frac {2 b^2 x^{2 n}}{n+2}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[x^3*(a + b*x^n)^2,x]

[Out]

(x^4*(a^2 + (8*a*b*x^n)/(4 + n) + (2*b^2*x^(2*n))/(2 + n)))/4

________________________________________________________________________________________

fricas [A]  time = 0.60, size = 74, normalized size = 1.68 \[ \frac {2 \, {\left (b^{2} n + 4 \, b^{2}\right )} x^{4} x^{2 \, n} + 8 \, {\left (a b n + 2 \, a b\right )} x^{4} x^{n} + {\left (a^{2} n^{2} + 6 \, a^{2} n + 8 \, a^{2}\right )} x^{4}}{4 \, {\left (n^{2} + 6 \, n + 8\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^3*(a+b*x^n)^2,x, algorithm="fricas")

[Out]

1/4*(2*(b^2*n + 4*b^2)*x^4*x^(2*n) + 8*(a*b*n + 2*a*b)*x^4*x^n + (a^2*n^2 + 6*a^2*n + 8*a^2)*x^4)/(n^2 + 6*n +
 8)

________________________________________________________________________________________

giac [B]  time = 0.19, size = 88, normalized size = 2.00 \[ \frac {2 \, b^{2} n x^{4} x^{2 \, n} + 8 \, a b n x^{4} x^{n} + a^{2} n^{2} x^{4} + 8 \, b^{2} x^{4} x^{2 \, n} + 16 \, a b x^{4} x^{n} + 6 \, a^{2} n x^{4} + 8 \, a^{2} x^{4}}{4 \, {\left (n^{2} + 6 \, n + 8\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^3*(a+b*x^n)^2,x, algorithm="giac")

[Out]

1/4*(2*b^2*n*x^4*x^(2*n) + 8*a*b*n*x^4*x^n + a^2*n^2*x^4 + 8*b^2*x^4*x^(2*n) + 16*a*b*x^4*x^n + 6*a^2*n*x^4 +
8*a^2*x^4)/(n^2 + 6*n + 8)

________________________________________________________________________________________

maple [A]  time = 0.02, size = 47, normalized size = 1.07 \[ \frac {2 a b \,x^{4} {\mathrm e}^{n \ln \relax (x )}}{n +4}+\frac {b^{2} x^{4} {\mathrm e}^{2 n \ln \relax (x )}}{4+2 n}+\frac {a^{2} x^{4}}{4} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^3*(a+b*x^n)^2,x)

[Out]

1/4*a^2*x^4+1/2*b^2/(n+2)*x^4*exp(n*ln(x))^2+2*a*b/(n+4)*x^4*exp(n*ln(x))

________________________________________________________________________________________

maxima [A]  time = 0.61, size = 40, normalized size = 0.91 \[ \frac {1}{4} \, a^{2} x^{4} + \frac {b^{2} x^{2 \, n + 4}}{2 \, {\left (n + 2\right )}} + \frac {2 \, a b x^{n + 4}}{n + 4} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^3*(a+b*x^n)^2,x, algorithm="maxima")

[Out]

1/4*a^2*x^4 + 1/2*b^2*x^(2*n + 4)/(n + 2) + 2*a*b*x^(n + 4)/(n + 4)

________________________________________________________________________________________

mupad [B]  time = 1.31, size = 43, normalized size = 0.98 \[ \frac {a^2\,x^4}{4}+\frac {b^2\,x^{2\,n}\,x^4}{2\,n+4}+\frac {2\,a\,b\,x^n\,x^4}{n+4} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^3*(a + b*x^n)^2,x)

[Out]

(a^2*x^4)/4 + (b^2*x^(2*n)*x^4)/(2*n + 4) + (2*a*b*x^n*x^4)/(n + 4)

________________________________________________________________________________________

sympy [A]  time = 0.97, size = 202, normalized size = 4.59 \[ \begin {cases} \frac {a^{2} x^{4}}{4} + 2 a b \log {\relax (x )} - \frac {b^{2}}{4 x^{4}} & \text {for}\: n = -4 \\\frac {a^{2} x^{4}}{4} + a b x^{2} + b^{2} \log {\relax (x )} & \text {for}\: n = -2 \\\frac {a^{2} n^{2} x^{4}}{4 n^{2} + 24 n + 32} + \frac {6 a^{2} n x^{4}}{4 n^{2} + 24 n + 32} + \frac {8 a^{2} x^{4}}{4 n^{2} + 24 n + 32} + \frac {8 a b n x^{4} x^{n}}{4 n^{2} + 24 n + 32} + \frac {16 a b x^{4} x^{n}}{4 n^{2} + 24 n + 32} + \frac {2 b^{2} n x^{4} x^{2 n}}{4 n^{2} + 24 n + 32} + \frac {8 b^{2} x^{4} x^{2 n}}{4 n^{2} + 24 n + 32} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**3*(a+b*x**n)**2,x)

[Out]

Piecewise((a**2*x**4/4 + 2*a*b*log(x) - b**2/(4*x**4), Eq(n, -4)), (a**2*x**4/4 + a*b*x**2 + b**2*log(x), Eq(n
, -2)), (a**2*n**2*x**4/(4*n**2 + 24*n + 32) + 6*a**2*n*x**4/(4*n**2 + 24*n + 32) + 8*a**2*x**4/(4*n**2 + 24*n
 + 32) + 8*a*b*n*x**4*x**n/(4*n**2 + 24*n + 32) + 16*a*b*x**4*x**n/(4*n**2 + 24*n + 32) + 2*b**2*n*x**4*x**(2*
n)/(4*n**2 + 24*n + 32) + 8*b**2*x**4*x**(2*n)/(4*n**2 + 24*n + 32), True))

________________________________________________________________________________________